/*
 * @Author: taosong 2289713738@qq.com
 * @Date: 2023-12-15 20:44:36
 * @LastEditors: taosong 2289713738@qq.com
 * @LastEditTime: 2023-12-16 14:43:07
 * @FilePath: \ele-h5\src\router\index.ts
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 */
import { createRouter, createWebHistory } from 'vue-router'
import TabsView from '../views/tabs/TabsView.vue'
import HomeViewVue from '@/views/tabs/home/HomeView.vue'
import OrderViewVue from '@/views/tabs/order/OrderView.vue'
import MeViewVue from '@/views/tabs/me/MeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/tabs',
      name: 'tabs',
      component: TabsView,
      children: [
        { path: '/home', name: 'home', component: HomeViewVue },
        { path: '/order', name: 'order', component: OrderViewVue },
        { path: '/me', name: 'me', component: MeViewVue }
      ]
    }
  ]
})

export default router
